|
hai, everybody!!! I got problem with silent install by using platform VB.NET and actually, i dont know how to start it! So, everyone who know the sample code or any web site for this silent installation that can let me for reference it!
:-OThanks for ur!;P
|
|
|
|
|
|
Thanks for u, Ranoush!!!
|
|
|
|
|
I have created a windows Service and from this service i am trying to print a File but it is not doing this. I am doing as follows
Dim pr_Process As New Process
pr_Process.StartInfo.FileName = "C:\Hello.txt"
pr_Process.StartInfo.Verb = "print"
pr_Process.StartInfo.UseShellExecute = True
pr_Process.StartInfo.CreateNoWindow = True
pr_Process.Start()
It is not generating any error but also not printing any thing.
waiting for Fellow reply
Thanks
|
|
|
|
|
Did you tag your service (in the Service Control Manager) as "Allow service to interact with desktop"? Since your using ShellExecute = True and using Notepad (I assume) to do the printing, you need to allow your service to interact with the desktop so your app has access to the Desktop Shell and the is actually a Desktop to run Notepad on, regardless of your CreateNoWindow property.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a timing problem with class objects becoming available to external processes from an ActiveX Server (EXE Server) before the Main() function has completed initialization. The EXE Server is set to be single threaded (i.e. thread pool = 1) and the class objects are all multiuse.
The class objects require resources initialized by Main() and thus when the external process creates one of these objects, the object's initialization fails because the required resources are not available.
This is apparently a well known problem with ActiveX Servers but I am not in a position to rearchitect or rewrite the code - I am stuck with VB 6.
My question is this: how can I control the availability of the class objects until AFTER the EXE Server Main() function has completed?
I have read articles which state that you can overcome the problem with calls to CoRegisterClassObject() with the REGCLS_SUSPENDED option and then calling CoResumeClassObjects() when initialization is complete, but no samples on how to do this from VB 6.
TIA.
...Steve
|
|
|
|
|
Hi does someone know how to send a mouse click signal
I want to send a code that the mouse sends the left click and holds it
do you know how to make it?
|
|
|
|
|
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Const BM_CLICK = &HF5
Dim x As Long, staticx As Long, MyStr As String, y As String, control As Long
x = FindWindow("#32770", vbNullString)
'x = FindWindow(vbNullString, "Project")
' get handle to Ok button
control = FindWindowEx(x, 0, "Button", "Ok")
' click the button
SendMessage control, BM_CLICK, 0, 0
SendMessage control, BM_CLICK, 0, 0
End Sub
That's how you click a button on a msgbox - in this case "ok". I imagine it will be reasonably similar but not sure about the holding it, you could try putting the SendMessage Control in a loop.. The #32770 is the msgbox class, to send a message to a different window use the commented out bit and put the name of the window you wish to send the message to in place of "Project"
Sound!!!!!!
Hope you can work with that
"If i was king cigarettes would be free."
|
|
|
|
|
this is whaT I have....
<br />
Dim i As Integer<br />
Do While Not rs.EOF<br />
<br />
For i = 0 To rs.Fields.Count - 1<br />
DepartmentCbo.Text = DepartmentCbo.Text & rs.Fields("Department").Value<br />
LocationCbo.Text = LocationCbo.Text & rs.Fields("Location").Value<br />
<br />
Next<br />
rs.MoveNext()<br />
Loop<br />
What am i missing???
the result is the contents are filled next to one another not listed like this museumplanetariumfloor1floor2 it should b like this
museum
planetarium
floor 1
floor2
etc.
Help is great only if you ask correctly
|
|
|
|
|
hey, jlawren7:
Did you re-type this to post it? Cause I'm seeing a very small bug... at the 'Next' line... shouldn't it say Next i?
Regards.
Pablo.
|
|
|
|
|
i copied and pasted the code i trid putting " i " after next but i still get the same results
in vb6 i could do this
ADODeptLocation.Refresh
ADODeptLocation.Recordset.MoveFirst
CboDepartment.AddItem ADODeptLocation.Recordset("Department")
CboLocation.AddItem ADODeptLocation.Recordset("Location")
'loop through for all the records
Do While Not ADODeptLocation.Recordset.EOF
CboDepartment.AddItem ADODeptLocation.Recordset("Department")
CboLocation.AddItem ADODeptLocation.Recordset("Location")
ADODeptLocation.Recordset.MoveNext
Loop
CboDepartment.ListIndex = 0
CboLocation.ListIndex = 0
and this would fill the combo box list items
Help is great only if you ask correctly
|
|
|
|
|
If you are usinig VB .NET you could easily just set the combobox datasource to the dataset you are going to use for it and then set the displaymember property to the field in the dataset in the properties box of the combobox.
|
|
|
|
|
Hi,
I have several textboxes connected to an MS access database (not with code but wizards). I also have a tab control.
The problem is: when I clear the textboxes with textbox1.text = "" or .clear method it clears it (or so it seems), but when I click on a different tab and back it reappears like it haven't been cleared
I also tried clearing dataset, not working.
I have tried almost everything, and nothing seems to fix this problem.
Any suggestions?
Thank You
|
|
|
|
|
So your textboxes are bound to a table.
Are yo trying to add a new record ? is this why your clearing the textboxes?
BTW if you clear text boxes ty not to use the ""
use this ex. textbox1.text =vbnullstring
vbnullstring is a faster and mre efficient way of clearing a TEXTbox or checking the contents of a text box
post some code so we know what your trying to do...
Help is great only if yu ask correctly
|
|
|
|
|
thanks for an excellent method, works great, although the problem was in dataset. it was kind of weird, what happened was a database connection seemed to be in a stage between being fully opened and fully closed so dataset.clear was giving me an (connection not opened) error but textbox.clear woudln't clear the text (which was bound to the dataset)
|
|
|
|
|
sorry.. forgot to sign in
|
|
|
|
|
I am trying to resolve a problem with keyboard handling for an Windows Forms application that consists of a number of datagrids. Adding and deleting records is allowed only with button actions. The datagrids contain combobox columns. Column navigation is by TAB/Shift-TAB and RIGHT/LEFT Arrows. I am trying to achieve keyboard control for the combobox columns as follows:
Press ENTER for first time in the combobox column drops the list (droppeddown=true), UP/DOWN Arrows navigates the list, press ENTER again closes the drop (droppeddown=false) and selects the value. I am able to get the combobox to drop on the first ENTER press, navigate UP/DOWN the list, but cannot catch the second ENTER to close the dropdown. The only way to exit the combo is TAB or ARROW.
I am using the KeyUp event for the ComboBoxColumn and some message code for the ComboBox. There seems to be some sort of conflict here that I cannot figure out. Any help would be appreciated.
Here is my code that I am using in both the ComboBoxColumn and in the extended ComboBox:
ComboBox Code:
Public Class NoKeyUpCombo <br />
Inherits CompletionCombo <br />
Private Const WM_KEYUP As Integer = 257 <br />
<br />
Protected Overloads Overrides Function ProcessKeyMessage(ByRef m As Message) As Boolean <br />
Dim key As Keys = CType(CType(m.WParam.ToInt32, Integer), Keys) <br />
<br />
Select Case key <br />
Case Keys.Tab <br />
Return True <br />
Case Keys.Up, Keys.Down <br />
Return False <br />
Case Else <br />
Return MyBase.ProcessKeyMessage(m) <br />
End Select <br />
End Function <br />
<br />
Protected Overloads Overrides Function IsInputKey(ByVal key As Keys) As Boolean <br />
Select Case key <br />
Case Keys.Up, Keys.Down <br />
Return True <br />
End Select <br />
Return MyBase.IsInputKey(key) <br />
End Function
ComboBoxColumn Code:
Private _ColumnComboBox As NoKeyUpCombo<br />
<br />
AddHandler _ColumnComboBox.KeyUp, AddressOf ComboBoxKeyUp <br />
AddHandler _ColumnComboBox.KeyDown, AddressOf ComboBoxKeyDown <br />
<br />
<br />
Private Sub ComboBoxKeyDown(ByVal sender As Object, ByVal e As KeyEventArgs) <br />
If e.KeyCode = Keys.Enter Or e.KeyCode = Keys.Execute Or e.KeyCode = Keys.Return Then <br />
Dim cbx As NoKeyUpCombo = CType(sender, NoKeyUpCombo) <br />
cbx.SelectedIndex = _SelectedIndex <br />
Debug.WriteLine(_ColumnComboBox.SelectedIndex.ToString & "KeyDown-ENTER:" & _ColumnComboBox.Text) <br />
e.Handled = False <br />
End If <br />
End Sub <br />
<br />
Private Sub ComboBoxKeyUp(ByVal sender As Object, ByVal e As KeyEventArgs) <br />
Dim i As Integer <br />
If Not _ColumnComboBox.DroppedDown Then <br />
If e.KeyCode = Keys.Enter Or e.KeyCode = Keys.Execute Or e.KeyCode = Keys.Return Then <br />
_ColumnComboBox.DroppedDown = True <br />
KeyStrokeProcessed = True <br />
_ColumnComboBox.Invalidate() <br />
_ColumnComboBox.Update() <br />
End If <br />
Else <br />
Select Case e.KeyCode <br />
Case Keys.Down <br />
i = _ColumnComboBox.SelectedIndex <br />
If _ColumnComboBox.Items.Count > i Then <br />
_SelectedIndex = i + 1 <br />
_ColumnComboBox.SelectedIndex = _SelectedIndex <br />
_ColumnComboBox.Invalidate() <br />
_ColumnComboBox.Update() <br />
e.Handled = False <br />
Debug.WriteLine(_ColumnComboBox.SelectedIndex.ToString & "-Down:" & _ColumnComboBox.Text) <br />
End If <br />
Case Keys.Up <br />
i = _ColumnComboBox.SelectedIndex <br />
If i > 0 Then <br />
_SelectedIndex = i - 1 <br />
_ColumnComboBox.SelectedIndex = _SelectedIndex <br />
_ColumnComboBox.Invalidate() <br />
_ColumnComboBox.Update() <br />
e.Handled = False <br />
Debug.WriteLine(_ColumnComboBox.SelectedIndex.ToString & "-Up:" & _ColumnComboBox.Text) <br />
End If <br />
<br />
Case Keys.Enter, Keys.Execute, Keys.Return <br />
If _ColumnComboBox.DroppedDown Then <br />
_ColumnComboBox.SelectedIndex = _SelectedIndex <br />
Debug.WriteLine(_SelectedIndex.ToString & ":*" & _ColumnComboBox.Text) <br />
_ColumnComboBox.DroppedDown = False <br />
KeyStrokeProcessed = False <br />
_ColumnComboBox.Invalidate() <br />
_ColumnComboBox.Update() <br />
'e.Handled = True <br />
Debug.WriteLine(_ColumnComboBox.SelectedIndex.ToString & "ENTER Press 2-New Value:" & _ColumnComboBox.Text) <br />
End If <br />
End Select <br />
'Dim cbx As NoKeyUpCombo = CType(sender, NoKeyUpCombo) <br />
'cbx.SelectedIndex = _SelectedIndex <br />
' Debug.WriteLine(_ColumnComboBox.SelectedIndex.ToString & "-dgcKeyPress:" & _ColumnComboBox.Text) <br />
Return <br />
End If <br />
End Sub
|
|
|
|
|
Hi guys & gals,
I would like to know how to select a item from the listview to a new form.
I have 2 items listed in the listview1.
On clicking the first item (row), I want to open up a new form called Form1
on clicking the second Item (row), I want to open another new form called Form2.
Tnx a bunch in advance.
Paps
|
|
|
|
|
Try this:
Private Sub ListView1_Click(blablabla... )
If ListView1.ListItems(1).Selected = True Then
Form1.Show
Else
Form2.Show
End If
End Sub
Ok, hope you got it.
Kindly, Pablo.
|
|
|
|
|
Hey,
Is there a way to check if an application is running in the Task Manager? and if it is kill it before starting my own custom process?
I have the following function which sends a file to a printer but it opens up the application (e.g. MS Word) and sends the print command before closing it again.
Private Sub SendFileToPrinter()
Dim startinfo As New ProcessStartInfo
startinfo.FileName = strFullFilePath
startinfo.Verb = "print"
startinfo.WindowStyle = ProcessWindowStyle.Hidden
Process.Start(startinfo)
End Sub
The problem is that sometimes it doesnt exit the application fully and it is still running in the background.
Is the a way to get the location of the application .exe file that is running from the MIME type of the file, and then close it?
thanks for your help
Chris
|
|
|
|
|
This is what I've done. I hope it works to you.
Private Sub KillProcess()
procesos = Process.GetProcesses
Dim p As Process
For Each p In procesos
If (p.ToString.LastIndexOf(nameOfProcessToKill) > 0) Then
p.kill()
Exit Sub
End If
Next
End Sub
E-mail me back would you?
Regards, Carlos
F chile
|
|
|
|
|
Hi all,
I have a small problem regarding uploading a file using the Inet control and Http.
What i am trying to do is build a component that allows you to upload multiple files at the same time. What I have is a list box that you can drag and drop files into, i then want the user to click the process button and it will go and transfer all the files one by one with a progress bar that shows the user what is happening.
For some reason, god knows why the men above wish this to be done over HTTP and not FTP, (i think this would be too simple for them).
Anyway, as i have a component that will contain the file names to upload in a list box basically outside of the html form i cannot use a HTML File Input box and post the form using ENCTYPE=multipart/form data.
This makes it hard as there seems to be little information on this without using the this method and the advice i get is use FTP...great, can't.
Does anybody know how to simulate the ENCTYPE=multipart/formdata Http post or know how to transfer a file to a web server using http (using no HTML forms) and just an ASP Page to receive and save the file?
PLEASE HELP PLEASE HELP, URGENT,
Any suggestions/advice greatly appreciated,
Thanks Ever So Much
Purple
"If i was king cigarettes would be free."
|
|
|
|
|
How can i convert a 5 digit number to date e.g. 05120 to 4/30/2005
|
|
|
|
|
Since I don't know of any 5 digit numbers that represents a date, what does this number represent?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
it actually a julian date format 10204120 all i need is to be able to convert last three digits 325 into months and day format in this case it's 04/31
|
|
|
|