|
|
hello sir, can u sent to my email explanation about steganografi and source code in VB 6?
please!
my email is adhe_pol@yahoo.com
|
|
|
|
|
No, because I haven't used VB6 in about 7 years now. It's a dead language, unsupported by Microsoft, and it's runtime will not longer be supported by the next version of Windows.
I already gave you everything you're going to get in that link in my previous reply. This is where you start researching the subject on your own.
|
|
|
|
|
Why are you using VB6 ? It's been a dead language for a long time now.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Is is possible to create a class wide conditional breakpoint in VB 2005? I have a variable value being changed somewhere within a pretty large class, but I can't it narrow down to a specific method (I've done searches where the variable is being set and placed breakpoints with no success).
In VB6 you could add a watch with a condition and set the procedures and modules to ALL. Is there similar functionality in VB .NET (something more global than "function" level)? I'm realize I'm probably missing something simple here....
Edit - I figured out my problem, but am still curious on a module/class level conditional break point.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
modified on Thursday, December 18, 2008 1:42 PM
|
|
|
|
|
It's not possible to do the way you're thinking. But, you can wrap the suspected variable in a Property, then the rest of your code can change that value through the property's Set code. Your can set you're breakpoint on that set code to get the result you want.
|
|
|
|
|
Dave Kreskowiak wrote: It's not possible to do the way you're thinking.
Grumble, grumble. Another thing I hate about .Net then! I also hate the fact that if you copy and paste code into the immediate window (todo a debug print) that is either split on multiple lines or within a "With" statement, that you must retype the full name and remove the carriage returns. VB6 just prints out the values.
Dave Kreskowiak wrote: But, you can wrap the suspected variable in a Property, then the rest of your code can change that value through the property's Set code. Your can set you're breakpoint on that set code to get the result you want.
Great idea Dave.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Normally, the only thing in a class that should be modifying the private backing variables for a property IS the property code. Yes, you can, and really should, have private properties inside classes. You can then use Trace Breakpoints on those properties. A Trace Breakpoint gives you the option of logging a message, variable values, call stack, whatever..., and then continuing execution of the code, without stopping. It's excellent for logging all changes to a variable from everywhere.
|
|
|
|
|
I previously haven't used a private property for class level variables, but I can see the proper use and benefit now with your explanation. Thanks for the pointers with private properties and tracing.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
No problem!
|
|
|
|
|
How to check System DSN name is already configured or not before creating a new DSN using VB.net2005
Saseendran Kombath
|
|
|
|
|
System DSN's (why would even need one in this day and age?) are stored in the Registry under
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ . All you have to do is check there. I suggest opening up Regedit and looking around before you start writing code.
|
|
|
|
|
Check name(as String value) is present under following registry key or not?
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC DATA Sources.
For Example:
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC DATA Sources(Key) "OrcInfoCtr"(String value) "Oracle in OraClient11g_home1"(Data Value)
ashish
|
|
|
|
|
You obviously found the registry key in regedit. Isn't what you see there pretty obivous??
The DSN name would be a value under "ODBC Data Sources", then it's settings are in a folder of that name under ODBC.INI.
Honestly, how hard is it to see what's going on in there? And why are you replying to a message that's two and half years old??
|
|
|
|
|
I'm using this class Rs232 to call phone number as it happen in the commnication >> hyper terminal .. in XP-PC
I'm using the name of Modem instead of the number of port,the same way in the hyper terminal.. so is this possible and will it succees with?
Dim rs As New RS232.Rs232<br />
rs.Port.ToString("Softv92faxmodem")<br />
rs.Open()
|
|
|
|
|
I would have thought it would have been quicker to try it than post the question.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
The ony;l way to tell is to try it. Though, I seriously doubt it'll work this way.
You're best source of information and support is the people who wrote the library you're using.
|
|
|
|
|
i treid this but it didn't usccees, it didn't opem the connect.
Imports RS232.Rs232
Dim rs As New RS232.Rs232
With rs
.Port.ToString("SoftV92FaxModem")
.BaudRate = 2400
.DataBit = 8
.StopBit = RS232.Rs232.DataStopBit.StopBit_1
.Parity = RS232.Rs232.DataParity.Parity_None
.Timeout = 500
End With
rs.Open()
rs.Write(Me.TextBox1.Text)
|
|
|
|
|
I really hate repeating myself. First, the best source of support for any library you use is the people who wrote that library. Second, Port is usually going to be "COM1", "COM2", "COM3", ... or whatever the library supports. It LOOKS like this one only understands the COM designations, so:
Dim rs as New RS232.Rs232
With rs
.Port = "COM3"
.BaudRate = 2400
.DataBit = 8
.StopBit = RS232.Rs232.DataStopBit.StopBit_1
.Parity = RS232.Rs232.DataParity.Parity_None
.Timeout = 500
End With
rs.Open()
rs.Write(Me.TextBox1.Text)
Also, the communication parameters MUST be correct, otherwise, you'll either get nothing on the receiving device or you'll get garbage. Double-check with the device to verify what parameters you are supposed to use.
|
|
|
|
|
Hi,
I am trying to change the status of checkbox using SendMessage. For some reasons it's not working. Can anyone fix this for me? below is my code:
Imports System.Runtime.InteropServices
Public Class Form1
Private Const BM_GETCHECK As Long = &HF0
Private Const BM_SETCHECK As Long = &HF1
Private Const BS_AUTOCHECKBOX As Long = &H3
Private Const BST_CHECKED As Long = 1
Private Const BST_UNCHECKED As Long = 0
<DllImport("user32.dll")> _
Private Shared Function SendMessage(ByVal hWnd As IntPtr, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim CheckBox As Control
CheckBox = CheckBox1
Dim value As IntPtr
value = CheckBox.Handle
SendMessage(value, BM_SETCHECK, BST_CHECKED, 0)
End Sub
End Class
Thanks in advance,
Scot
|
|
|
|
|
Isnt' that a bit extravegant when you could do the exact same thing with:
CheckBox1.Checked = True
Perhaps you've left out some details of what you intend to do with this?
|
|
|
|
|
Yes. Sorry, I didn't explain the purpose. This is just a sample spike application that i am trying to get working. The actual implementation is quite different where using API calls I am trying to check another compiled .NET application's checkbox.
-Thanks
modified on Thursday, December 18, 2008 11:42 PM
|
|
|
|
|
With inspiration from the following web site https://bytes.com/topic/net/answers/637107-how-find-out-if-check-box-checked I solved it like this in C# (it shouldn't be too hard to convert to Visual Basic):
using Accessibility;
[DllImport("oleacc.dll", PreserveSig = false)]
[return: MarshalAs(UnmanagedType.Interface)]
public static extern object AccessibleObjectFromWindow(IntPtr hwnd, uint dwId, ref Guid riid);
[DllImport("user32.dll", CharSet = CharSet.Auto)]
static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, int wParam, StringBuilder lParam);
public static Nullable<bool> isCheckBoxChecked(IntPtr checkBoxHandle)
{
const UInt32 OBJID_CLIENT = 0xFFFFFFFC;
const int UNCHECKED = 1048576;
const int CHECKED = 1048592;
Guid uid = new Guid("618736e0-3c3d-11cf-810c-00aa00389b71");
IAccessible accObj = (IAccessible)AccessibleObjectFromWindow(checkBoxHandle, OBJID_CLIENT, ref uid);
object o2 = accObj.get_accState(0);
if ((int)o2 == UNCHECKED)
{
return false;
}
else if ((int)o2 == CHECKED)
{
return true;
}
else
{
return null;
}
}
public static void setCheckBoxChecked(IntPtr checkBoxHandle, bool shouldBeChecked)
{
bool isChecked = (bool)isCheckBoxChecked(checkBoxHandle);
if ((!isChecked) && (shouldBeChecked))
{
SendMessage(checkBoxHandle, BM_CLICK, 0, null);
}
else if ((isChecked) && (!shouldBeChecked))
{
const UInt32 OBJID_CLIENT = 0xFFFFFFFC;
Guid uid = new Guid("618736e0-3c3d-11cf-810c-00aa00389b71");
IAccessible accObj = (IAccessible)AccessibleObjectFromWindow(checkBoxHandle, OBJID_CLIENT, ref uid);
accObj.accDoDefaultAction(0);
}
}
|
|
|
|
|
The project I am currently working on involves communication with multiple embedded devices over a network.
I have managed to get to the point where I am getting all of the required information back from the devices, however, until runtime I do not know how many devices there will be.
I have defined a class for the devices which i have called 'unitclass', which has variables for all of the necessary data such as MAC address etc.
What I am wondering, is how can I create new instances of this class at runtime via iteration, ie
for n = 1 to (number of devices)<br />
dim n as new unitclass<br />
next n
Thanks, Chris
|
|
|
|
|
If I am understanding your question correctly, what I would do is add each UnitClass object which is created during your loop to a collection along with a key so that you can access each object when needed.
Please let me know if I have got the wrong end of the stick!
|
|
|
|