|
Hello there
I am building one database setup wizard in VB.Net . In which on click event I need to create database with tables, Views ,Triggers and procedures.I have the script on one Script file.
So how to run that file from vb code to create database on specified server.
Best Regards
Rizwan Bashir
|
|
|
|
|
Is it any way to do this? I get an IE window containing a msword document and need to access its automation methods.
Help me!
Thanks.
"When I look into your eyes, there´s nothing there to see, nothing but my own mistakes staring back at me"
|
|
|
|
|
I PLANED TO DO MY MAIN PROJECT IN VB.NET. IN VB.NET I WANT TO DO "COMMUNICATION MANAGEMENT PROTOCOL LIBRARY" PROJECT. SO YOU PLEASE SEND THE SOURCE CODE OF "COMMUNICATION MANAGEMENT PROTOCOL LIBRARY" TO MY E-MAIL ADDRESS. MY E-MAIL ADDRESS IS: myjamalmd@hotmail.com
THANK YOU.
jamal
|
|
|
|
|
3) STOP YELLING!
2) N-one knows what your talking about when you say "communication management protocol library"!
1) Write it your damn self! No-one here is going to write it for you or supply it to you. That's not why we're here. We're here to answer questions about programming problems you may have, not be your personal servant for finding stuff on Yahoo[^] or Goggle[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I am creating a usercontrol in VB.NET and calling it by VB.NET application. I would like to generate button click event of button(which is in the form of application which use my UserControl) from UserControl. Can anyone explain me how do I know the which form(name of form) of application is using my usercontrol and how to generate button click event?
I look forward to your replies.
thanks,
atul
|
|
|
|
|
when on the control add this
AddHandler btn.click, AddressOf btn_Click
' Paste this functon
Private Sub btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
msgbox "Button Clicked"
End Sub
Rizwan Bashir
|
|
|
|
|
Hi
I created a usercontrol, and I like to fire o raise an event included in the base class (Usercontrol class).
raiseevent mybase.someevent .....
does not allowed, so, how a can do that??
I try to override the base event with a new "shadows event", like:
public shadow event someevent(.....)
but the:
raiseevent someevent....
Doesn't work!
thank you for your repply
Gabriel
|
|
|
|
|
Hi,
I think this code will fullfill your need.
'--- BEGIN
Private Btn As Button
Private y As Integer = 10, ID As Integer = 1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Btn = New Button()
Btn.Location = New Point(10, y)
Btn.Text = "Button" & ID.ToString
AddHandler Btn.Click, AddressOf Hai_Click
Me.ParentForm.Controls.Add(Btn)
y += Btn.Height
ID += 1
End Sub
Private Sub Hai_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim C As Control = sender
MsgBox("Hello Friend....! U Have Selected " & C.Text, MsgBoxStyle.Information, "")
End Sub
'--- END
|
|
|
|
|
Hello,
I am writing a UserControl in VB.NET. The UserControl has a class called NotifyClass. I have one USB device and when this device is connected to PC, I am taking this event to call the NotifyClass. On the other side, I have application in VB.NET which also calls a method a function in UserControl to pass some input parameters and get the result back. In short I have two instances one which calls my OCX notifyClass and one which calls OCX to get results. But these two events takes place at different times and there is no communication between them. Can anyone explain me how to implement communication between these remote objects?
I look forward to your reply.
thanks/regards,
Atul
|
|
|
|
|
Hi All,
I want to convert IntPrt back to its original Object in VB.NET.
Is it possible ? I am a newbee and I need help on this from u.
Thank you.
|
|
|
|
|
Not quite sure I get what you're asking. Could you post a code snippet/sample?
|
|
|
|
|
I am trying to figure out if VB.NET (or even VB6) is the best way to test for an existing instance of an application. Basically, I want the code to test (I assume in Processes) whether the application is already active, and if it is, not open a second instance. (Of course, if it is not already running, then the application should open). Can anyone steer me in the right direction?
|
|
|
|
|
Your application should do this, not some external application. The way you've worded this suggests that you think otherwise.
No, C++ is the best language to do this in, but if you're stuck with VB.NET, then there's no reason why VB.NET can't do it. There are tons of examples on the web, and probably even on CP. You're more likely to find them in C#, I'd have thought, but they should be easy to convert.
I have no doubt that this is beyond VB6's meagre abilities.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Yes, the base application should do this...long story as to why it doesn't.
Anyway, VB.NET is what I'm "stuck with" to achieve this objective. Can you point me to some examples "on the web" and/or CodeProject?
Thanks!
|
|
|
|
|
You can do this with API calls, which are even within the grasp of VB6 "meager" abilities. LOL.
EnumProcesses is one way but it can be cumbersome to work with.
If the application creates a main window that has a reasonably unique caption that does not change (in other words, this would never work with a web browser, but is feasible for most regular compiled apps) you can use the FindWindowEx API.
If you search for the app caption and window class, and the handle returns as zero, the app is (probably) not running.
Use Spy to help you determine the caption and window class name to search for.
Robert
|
|
|
|
|
Robert,
Thank you for the information. I am not familiar with the type of calls you are referring to. Could you provide a code example to accomplish what you are describing? Thanks!
|
|
|
|
|
Here is a quick and dirty way of checking for a process.
First you need a reference to the SystemDiagnostics.
Imports System.Diagnostics
Then
Dim myProcess As Process() = Process.GetProcessesByName("ProcessName")<br />
If myProcess.Length > 1 Then<br />
MsgBox("You can only have one instance of this application running.")<br />
End If
Hope this helps
|
|
|
|
|
Hi,
My MainForm is set as a MDI Parent and I have a number of MDI Child Forms. However, I have a problem with one of the MDI Child forms containing a PictureBox.
I am drawing my graphics offscreen (a large background jpg image onto which I draw some additional items, using GDI+), I then using BitBlt to Paint a portion of this image inside the PictureBox. (The mouse is then used to scroll the image).
If I dont have this form set as a MDI Child all works beautifully. However, when set as a MDI Child, problems arise. The image is not drawn on load and only appears when I move the mouse inside the PictureBox (as if to scroll). If I minimise the form and then maximise it - again no image appears until I move the mouse again.
My guess is that it has something to do with the Paint Event - I did read on MSDN that there is a problem with the Paint Event on MDI Children if the Opacity Property is used on the Child Form. I have left this at the default value of 100%.
Any help or suggestions would be most welcome.
Thanks,
NagaJim
|
|
|
|
|
Hi,
I need to create a crystal report in vb.net. Some fields can be pulled from database and some needs to be entered by the user. So i need to put editable text boxes in the report.
Can this be done?
|
|
|
|
|
is this anything you'd be able to handle with input parameters?
-jim
|
|
|
|
|
How do you get the correct location of the control? if it is inside a FORM within a PANEL within a GROUPBOX ?
Is it POSSIBLE to get the absolute location of the control (no matter inside of where it is?).
I want to overwrite the control with a new control.
Thanks
|
|
|
|
|
You can use left and top properties, from the microsoft reference:
Control.Left Property [Visual Basic]
Gets or sets the x-coordinate of a control's left edge in pixels.
[Visual Basic]
Public Property Left As Integer
[C#]
public int Left {get; set;}
[C++]
public: __property int get_Left();
public: __property void set_Left(int);
[JScript]
public function get Left() : int;
public function set Left(int);
Property Value
The x-coordinate of a control's left edge in pixels.
Remarks
The Left property value is equivalent to the Point.X property of the Location property value of the control.
Changes made to the Width and Left property values cause the Right property value of the control to change.
|
|
|
|
|
Yeap...Itried it it does not work.
I want the absolute position of the control.
(I want to overwrite the control)
when I try to overwrite the control using control.left or control.top and the control is within a panel it does not locate it correctly.
here is some of my code
newcontrol.left = oldcontrol.left
newcontrol.top = oldcontrol.top
oldcontrol.sendtoback
newcontrol.bringtofront
my newcontrol is set relative to the form1 not relative to my panel1 .
|
|
|
|
|
I know that...thanks
but, the point is:
I would like to get (there must be a way) the absolute positioning of the control.
|
|
|
|
|
i would say after reading your thread that the most likely problem is that you're not adding the newcontrol to the groupboxes controls collection.
a control's position property is always relative to it's immediate parent. so if you have oldControl on a panel and assign it's left property a value of 5, it will be 5 pixels (twips) off of the panel's left edge. if you have newControl directly on the form and assign it's left property a value of 5 it will appear 5 pixels off the forms left edge.
give this a try...
dim newControl as new textbox
myGroupBox.Controls.Add(newControl)
newControl.Top = oldControl.Top
newControl.Left = oldControl.Left
another way to do this would be to just create both controls at design time and position them as you wish. then at run-time all you have to do is add the code to handle hiding/showing them appropriately.
hope this helps,
-jim
|
|
|
|