473,327 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Program opens DOS/command window - but it should not

10
.Net Framework 4.0.30319 SP1Rel
vb.net 2010 10.0.40219.1 SP1Rel
Windows 7

I have searched on the web for this, but all I can find is how
to USE a command window from VB.net, nothing on how to NOT
get the window. I need to not have the window come up.

This problem is both when running debug in the IDE and after installing
with the .MSI.

When one of the command windows comes up it has
"file:///C:/ProjsVB.net/ImportCSV/ImportCSV/bin/Debug/ImportCSV.EXE"
as the title on the window. This is the .exe of the program I am
running. Nothing can be typed into the window.

One of the places it opens a command window is on the cn.Open()
statement below.

gARSConnectionString:
"Integrated Security=SSPI;Persist Security Info=False;Data Source=DEFDSDB56;
Initial Catalog=DEFDB_DEV;Connection Timeout=1200"

Expand|Select|Wrap|Line Numbers
  1.     Dim cmd As New SqlCommand
  2.     Dim cn As New SqlConnection(gConnectionString)
  3.     Dim dr As SqlDataReader
  4.  
  5.     Try
  6.       cmd.Connection = cn
  7.       cmd.CommandText = "dbo.spSelectCurrent"
  8.       cmd.CommandType = CommandType.StoredProcedure
  9.       cn.Open()
  10.       dr = cmd.ExecuteReader
  11.  
  12.  
It also happens on this sleep statement, with the same title on the
window:
Expand|Select|Wrap|Line Numbers
  1.       AboutdlgNew.Show()
  2.       Application.DoEvents()
  3.       Thread.Sleep(3000)
  4.       AboutdlgNew.Close()
  5.       AboutdlgNew.OKButton.Visible = True
  6.  
By the way, I started this program as a new project in a new solution
and added 3 forms from an existing project: Copied files into the project
folder, Show All Files, right-click and Include. Then I had to define
Public ProgressfrmNew as New Progressfrm in order to use a form. I
doubt this is related to the problem I am having. The problem occurs
in a module, not a form.

Stored procedure:

Expand|Select|Wrap|Line Numbers
  1. Select *, 
  2.     Is_Member('DEFRUDARole') | Is_Member('DEFRUDRole') | Is_Member('DEFRURole') | Is_Member('DEFRRole') as Security_AuditsReadFlag,
  3.     Is_Member('DEFRUDARole') | Is_Member('DEFRUDRole') | Is_Member('DEFRURole') as Security_AuditsUpdateFlag,
  4.     Is_Member('DEFRUDARole') | Is_Member('DEFRUDRole') as Security_AuditsDeleteFlag,
  5.     Is_Member('DEFRUDARole') as Security_DataAdminFlag,
  6.     Is_Member('ARSAdminsRole') as Security_ARSAdminFlag,
  7.     Is_Member('ARSOnlineFormsURole') as Security_ARSOnlineFormsUpdateFlag
  8. From Users
  9. Where User_NTDomain + '\' + User_Login = sUser_sName()
  10.  
I am in SQL Server 2008 R2.

Thanks in advance.
Oct 25 '13 #1
1 1200
MLarsB
10
Finally, I created a new project in a new solution, copied form and module
files into its folder, Show All Files, Included files.
The new project did not get the error. Done!!!
Oct 25 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: John | last post by:
Can anyone tell me how to run a bunch of commands in the same command line window? When I do this: system("command1") system("command2") .... it opens a new window for every system call. ...
11
by: KathyB | last post by:
Hi, I have an asp.net app running on an Intranet. From one of my aspx pages I would like to run a javascript that will run the following command OUTSIDE of the IIS/asp.net environment on the...
0
by: Tom Dacon | last post by:
"Open .Net Command Window Here" context menu for Windows Explorer: The reg file described below adds a new menu item to Windows Explorer's context menu when you right-click over a folder (or the...
6
by: James Li | last post by:
I need to run multiple .bat files(in specific order, sychronously) from my C# windows app. I also want to hide the DOS command window so that users don't see them. Basically my program lanches...
0
by: January Smith | last post by:
When I run the code below after creating an Empty .Net type project and adding an Empty C++ file it always opens a command window before displaying the form. If I write a similar VB application by...
2
by: risberg83 | last post by:
Hi I want to create a program that starts some kind of command window. The program should contain some functions and the user should be able to call these functions trough the command window....
5
by: piradie | last post by:
Hello, I've been googling around, and looking into different webpages but couldn't find a clear response for the issue I need to resolve, so I was hoping any of you could give me an answer to my...
4
by: boriq | last post by:
Hi, I'm using in my script command os.system('command') on Windows XP. Each time the os.system command is used, python opens an empty ms-dos command window (the black one) and then closes it. So...
1
by: requeth | last post by:
I'm trying to embed a command window in a form in VB.NET. I remember back in the old days there was a button in the IDE to add the window, and I never really learned how it worked. I just...
1
by: SilverGS | last post by:
I want to automatically open a Command Window from the Startup folder in Windows XP. right now after XP starts, I click on Start run, cmd and then when the command window is open I type in a bunch...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.