|
You have to just write a simple UPDATE query for this....
|
|
|
|
|
Give your message titles some kind of meaning other than 'help' or 'urgent.' If you continue very few people will help you.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
iam sorry ok
i will put a topic for my question
|
|
|
|
|
I have stored in my db the following:
name of form
name of button
shortcut key
function
now I want to create a class wich will make it easy for programmers to implement shortcut keys on the form (they are different on each form)
I can do everything except the actual calling of the code that needs to run (wich can also be different on every form)
this is what I have that works (when I know wich function to call)
Dim myChildForm As globalInterface = DirectCast(frm, globalInterface)<br />
myChildForm.edit()
is it possible to replace the last code by something wich will accept a string
I thought about 'CallByName' but I can't seem to get it working
and if not possible any idee on how I can solve this another way?
|
|
|
|
|
Hi,
Anyone knows how to set options in CD ripping using WMPLib.IWMPCdromRip?
Set Media Format - .wma, .mp3, .wav
Set Media Location to Save - Rip CD to "C:\Music"
Thanks...
Ian Bacalla
|
|
|
|
|
How can we auto generate Label and Text Box on Page Load...
|
|
|
|
|
Smells like an ASP.NET question to me.
The issue you have is, if you don't create it until page load, it's never going to have any viewstate. However, you can create them anytime you like, you just need a control on the page whose controls collection you can add it to.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have the following function that checks the availability of an SMTP server.
<br />
Private Enum SMTPResponse As Integer<br />
CONNECT_SUCCESS = 220<br />
GENERIC_SUCCESS = 250<br />
DATA_SUCCESS = 354<br />
QUIT_SUCCESS = 221<br />
End Enum<br />
<br />
<br />
Public Shared Function IsServerAvailable(ByVal Address As String) As Boolean<br />
Try<br />
Dim IPhst As System.Net.IPHostEntry = System.Net.Dns.GetHostEntry(Address)<br />
Dim endPt As New System.Net.IPEndPoint(IPhst.AddressList(0), 25)<br />
Dim socket As New System.Net.Sockets.Socket(endPt.AddressFamily, System.Net.Sockets.SocketType.Stream, System.Net.Sockets.ProtocolType.Tcp)<br />
socket.Connect(endPt)<br />
If Not CheckResponse(socket, SMTPResponse.CONNECT_SUCCESS) Then<br />
socket.Close()<br />
Return False<br />
Else<br />
Return True<br />
End If<br />
Catch<br />
Return False<br />
End Try<br />
End Function<br />
<br />
Private Shared Function CheckResponse(ByVal Socket As System.Net.Sockets.Socket, ByVal ExpectedResponse As SMTPResponse) As Boolean<br />
Dim sResponse As String<br />
Dim iResponse As Integer<br />
Dim bytes(1024) As Byte<br />
<br />
While Socket.Available = 0<br />
System.Threading.Thread.Sleep(100)<br />
End While<br />
<br />
Socket.Receive(bytes, 0, Socket.Available, Net.Sockets.SocketFlags.None)<br />
sResponse = System.Text.Encoding.ASCII.GetString(bytes)<br />
iResponse = Convert.ToInt32(sResponse.Substring(0, 3))<br />
If iResponse <> CType(ExpectedResponse, Integer) Then<br />
Return False<br />
Else<br />
Return True<br />
End If<br />
End Function<br />
The problem is, it always returns false with the error :-
No connection could be made because the target machine actively refused it
Any assistance of resolving this problem, would be gratefully received.
Thanks
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Find out if your ISP/Company's ISP/Corporate firewall allows outbound connections on port 25. It is commonly blocked to try and stop zombie spam mailbots.
|
|
|
|
|
I had already considered the firewall issue and do not believe that is the source of error, although I maybe wrong.
The server does require a user name and password, before I can send an email, so do I need to specify these when attempting to make a connection?
I suppose I could change my function to connect to the mailbox rather than the server.
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
What happens if you just do a port ping from your machine to the SMTP server on port 25?
|
|
|
|
|
I finally got to the bottom of my problem.
I have McAfee AV Enterprise v8.5 installed, which has a section within it called "Access Protection". Within this section you can define rules such as block all programs sending data via Port 25. I had not included my program into the exceptions list.
So you where close when said to check out my firewalls.
Thanks
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
I want to disable the visual styles for a usercontrol (I draw the whole thing myself (or almost))
but I can't seem to find how to do this
I know how to enable it : EnableVisualStyles
but how do you disable it?
I use visual studio 2005
also (just in case disable doesn't work) how can I tell my control to use a specifiek theme (silver for instance)
|
|
|
|
|
Hi, I dont know for VisualStyles in particular but there is a Control.SetStyle() method
that lets you exlain the control will be owner-drawn. Hope this helps.
|
|
|
|
|
I already did that
Me.SetStyle(ControlStyles.UserPaint, True)
but the control still seems to take the windows colors for the area's that I don't redraw
|
|
|
|
|
To get double-buffering in .NET 1.1 I used to set three bits: DoubleBuffer, AllPaintingInWmPaint, and UserPaint.
I expect you need to set the last two.
|
|
|
|
|
the problem is solved (at least for a bit)
he doesn't seem to use the theme's anymore but the controls does change the shade of white he uses from pc to pc
no clue why but at least ist a shade of white now
thanks
|
|
|
|
|
Hi, Concerning declarations of variables
Could some one please help by filling in the blanks to explain what I can't seem to find in my various VB.Net Library?
Dim:- Can be used to declare variables within the entire Form if placed before all the Private Sub crap, other wise known as the General Declarations area. Otherwise is for Local Variables only.
Static:- When used with a Local variable, the value is preserved for the lifetime of the application (while the program is running).
Public:- Must be contained in a standard Module not a Form and are visible throughout the entire project. (A Module is a Form without a user interface.)
Protected:- (Your answer goes here )
Friend:- Access is similar to Public, only Friend is restricted to only code within it’s project (application).
Shared:- (Your answer goes here )
Protected Friend:- (Your answer goes here )
Private:- Appears to be the same as Dim. Is it? (Your answer goes here )
Thank You!
|
|
|
|
|
frankiebaby2 wrote: Dim:- Can be used to declare variables within the entire Form if placed before all the Private Sub crap, other wise known as the General Declarations area. Otherwise is for Local Variables only.
Dim just declares a variable, the rest of what you said is about what the scope (visibility) of that variable is. A class wide variable is called a member variable.
frankiebaby2 wrote: Static:- When used with a Local variable, the value is preserved for the lifetime of the application (while the program is running).
Static means only one instace of a variable exists, so if it's a member, it's the same value for all instances, if it's inside a class, I believe it will persist, although it will get set every time it's called, unless there's a conditional branch.
frankiebaby2 wrote: Public:- Must be contained in a standard Module not a Form and are visible throughout the entire project. (A Module is a Form without a user interface
Wrong - a form can contain a public variable, although you should never use public variables anywhere ( use properties to expose private/protected variables )
Protected - means a variable is visible only to classes derived from this one
friend - this must be the same as 'internal' in C#. Man, VB naming is gay.
shared - is static ( static is a C# keyword, shared is it's VB equivelant )
protected friend - means it's visible only to classes derived from this one, and within the assembly
private - means only visible inside the class. private is the default, so if you don't specify anything, dim will assume private.
BTW, you could trivially have found all this out with google.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: A class wide variable is called a member variable.
or "field".
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
Is that VB specific terminology ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: Is that VB specific terminology ?
I thought it was general .NET terminology.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
|
Thank you Christian,
I appreciate you patience, Have tried Googling many things first but get overloaded with info and have trouble with info burn-out.
The manuals for VB.NET never seem to lay out the data completely. They touch on things and run off in all directions never completing all the info on the topic so that I can fully grasp it.
Once again,
Many Thanks Mate!
Frank
|
|
|
|
|
frankiebaby2 wrote: Dim:- Can be used to declare variables within the entire Form if placed before all the Private Sub crap, other wise known as the General Declarations area. Otherwise is for Local Variables only.
Dim declares variables and specifies their types and a possible initialization values.
frankiebaby2 wrote: Static:- When used with a Local variable, the value is preserved for the lifetime of the application (while the program is running).
Declares a variable as "persistant" between calls. For example, if you have a sub that is called many times and a variable in it is declared static, it retains it's value between calls. The variable is not destroyed and recreated to an intialized value. This can only be used at the procedure level.
frankiebaby2 wrote: Public:- Must be contained in a standard Module not a Form and are visible throughout the entire project. (A Module is a Form without a user interface.)
Specifies that a variable is visible outside the scope it is declared in. Public can only be specified at the namespace, module, or file level. Specifying Dim is optional.
frankiebaby2 wrote: Protected:- (Your answer goes here )
Protected variables or procedures are only visible to the class they are declared in or in derived classes.
frankiebaby2 wrote: Friend:- Access is similar to Public, only Friend is restricted to only code within it’s project (application).
Friend means that the element is only visible to code inside the same assembly (.DLL, .EXE) as the Friend element.
frankiebaby2 wrote: Shared:- (Your answer goes here )
Only a single instance of the Shared element exists and it exists without an instance of the class it's declared in.
frankiebaby2 wrote: Protected Friend:- (Your answer goes here )
A combination of the two above.
frankiebaby2 wrote: Private:- Appears to be the same as Dim. Is it? (Your answer goes here )
Declares the element is not visible outside the scope it is declared in. For instance, Private members of a class are only visible inside the class and any code in it. It is NOT a replacement for Dim.
The complete variable declaration line looks like this:
[ <attributelist> ] [ accessmodifier ] [[ Shared ] [ Shadows ] | [ Static ]] [ ReadOnly ]
Dim [ WithEvents ] variablelist
You do not have to have an attributelist.
You do not have to specify an access modifer, Public, Private, Protected, Friend, Protected Friend. If not access modifier is specified, Private is assumed.
Everything I just wrote, came from here[^].
|
|
|
|