|
Um I suspect I will end up with other object as I am reading data from oracle and flat data file and writing updates back.
I will give it a go though, knowledege is power as they say.
Thanks
Geoff
|
|
|
|
|
AaaaHa
It works thanks, maybe the day was not wasted
Cheers
Geoff
|
|
|
|
|
|
Ok, out of fear of getting flamed for a question that I should probably know the answer too, I'm going to post it anyways ...
I read articles from time to time, like this one:
http://www.codeproject.com/aspnet/CC_MultiMediaControl.asp
What are (I believe them to be attributes) before the declaration of the property, and what are they used for ... we never covered this in school, at least not yet.
IE:
<Category("Media Player")> _
<Browsable(True)> _
<Description("Show or hide the tracker.")>_
Public Property ShowTracker() As Boolean
Get
Return mShowTracker
End Get
Set(ByVal value As Boolean)
mShowTracker = value
End Set
End Property
Cheers,
Xaverian
|
|
|
|
|
These attributes are for design time support on your user control - they control the way the property shows in Visual Studio's (or SharpDevelop's) property grid when you put the control on a form using the forms designer.
Category: the category the property appears in (if sort by categories is active)
Browsable: Whether the property is visible in the property grid.
Description: The description shown below the property grid.
|
|
|
|
|
Thank you! I thought thats what they were, but wasn't sure, no one has ever explained it to me before. I can see where these can be usefull.
Is there somewhere else that I can learn more about additional attributes that are available? I've seen other attributes used as well, especially the "<serializable>" attribute.
Thanks again!
|
|
|
|
|
|
Thank you ...
I can see why the old cliche' of "10 years to pro" so relates to programming ... there is so much to know!
Thank you agian!
|
|
|
|
|
Hi,
I have an MHT file with few images have been stored inside.
MHT file has been created by IE and I think it is correct.
Header of every image looks like this:
The body looks like this:
------=_NextPart_000_0018_01C651FB.1F763700
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: file:///C:/Documents%20and%20Settings/GGG/Desktop/RRR%20SKINS/MaT/1-lo.gif
R0lGODlhNAAUAMQAAAAAAP///3TAQ93d3czMzLu7u6qqqpmZmYiIiHd3d2ZmZlVVVURERDMzMyIi
IhEREf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEA
ABAALAAAAAA0ABQAAAWpYCCOZGmeaKqubOu+cCzPdG2fwq2TuXkwtEIDAGAMToMF7vSbDR4JEcNx
KlBNvVJzNBgCEIEuYEhCKEcOA0IRBgSIwFKWtBUpgAXAQKFEuEcKYCMMB2ttAVZLPnFSByIOBYSH
I2YkaYYDbolYTIwBd4gABHwBfiRPglOlQKabckxERAdiX2FDZCQEXkZhDkVumZ4icy+kCA87NgS+
D47Jz9DR0tPU1dYwIQA7
I use the function URLDownloadToFile for extracting of images and saving on the disk:
file_path=mhtml :/nnn/Copy of Skin\example.mht
full_name=file://C:\Documents and Settings\GGG\Desktop\RRR SKINS\Mat\1-lo.gif
res = URLDownloadToFile(0, file_path & "!" & full_name, absTargetPath & "\" & FileName, 0, 0)
It worked with IE6 ok. I receive error res=-2147467259 (the file was not found) in IE7 and file cann't be extracted.
Could somebody help me please to solve this problem?
Thanks
|
|
|
|
|
having a text box which designate a 'ip address'
how can i check if the user has entered a valid ip address,
and not a string or ...
is there a format in the 'MaskedTextBox' for that ?
and what is the datatype of the field should be in the databsae?
regards
Regards
Ramy
|
|
|
|
|
1) valid format -- check it "manually" though code -- i don't know if the maskedtextbox or regular expressions can put a limit on the number(<=255)within each segment.
2) valid ip -- if your using 2005 - you can ping it
3) datatype -- string
|
|
|
|
|
valid format -- check it "manually" though code
and how is that??? :S
Regards
Ramy
|
|
|
|
|
Dim sIP As String = "192.168.0.1"
Dim sa() As String = sIP.Split(".")
If sa.Length <> 4 Then
MsgBox("invalid ip")
Exit Sub
End If
For i As Int16 = 0 To sa.GetUpperBound(0)
If Not IsNumeric(sa(i)) OrElse CInt(sa(i)) > 255 OrElse CInt(sa(i)) < 0 Then
MsgBox("invalid ip")
Exit Sub
End If
Next
|
|
|
|
|
|
I am a novice so I may not be a 100% correct but try this
If Not(Textbox1.text like "###.###.###.###")then
msgbox("You have not entered a valid format.")
Else
'perform routine.
End If
This should at least ensure they are entering the proper format (not a string, or odd characters, but it will not validate the IP address.
|
|
|
|
|
Hi,
i am using fileget to read a file, but i am going the following error:
System.Security.SecurityException was unhandled
Message="Late bound calls to file system methods in the Visual Basic runtime are not permitted."
My code is the following:
Public Structure rec
<vbfixedstring(4)> Public icount As String
<vbfixedstring(48)> Public iTellerID As String
<vbfixedstring(48)> Public iTellerName
End Structure
Public myrec = New rec
Dim iFr As Short
iFr = FreeFile()
FileOpen(iFr, "day_08.log", OpenMode.Binary, OpenAccess.Read)
FileGet(iFr, myrec,1)
FileClose(iFr)
What i am doing wrong? Please help.
|
|
|
|
|
You can find examples of reading and writing binary files in VB.NET here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thank you for replying,
The matter is that i am trying to read a data file. The company who wrote the file sent me a sample of how to read their file but the problem is that the sample is in c++ and my app is in vb.net
the data file sounds like that:
?
‰ L $100 CB 36772579 C $100 FB 49553858 B $100 FL 01935605 A $100 FB 63796061 A $100 FB 33316613 A $100 AB 665
The sample code is:
typedef struct tag_RawDataNoImage
{
// Default Data
char iTellerID[48];
char iTellerName[48];
char iWorkstationID[16];
char iCustomerName[48];
char iCustomerACNo[32];
char iCustomerAddr1[64];
char iCustomerAddr2[64];
char iCustomerIDNo[32];
// Counter Data
SYSTEMTIME iDateTime;
int iType; // 0:Dollar , 1:Euro
int iDenom[10];
int iUnit[10]; // Number of each denomination
int iTotalUnit; // Total Number of count
int iTotalAmount; // Amount of count
int iUVMG; // 0-None , 1-UV , 2-MG , 3-UV/MG
char iImgResult[MAX_ROW_COUNT][32];
} RawData;
int main(int argc, char* argv[])
{
unsigned int i;
CFile file;
DWORD iRawDataCount;
RawData data;
CString itemStr, dataStr;
int uIndex,fOfs;
if(argc < 2)
{
printf("please enter name of Raw file. ex: Day_08.log\n");
return 0;
}
if(!file.Open(argv[1], CFile::modeReadWrite ))
{
printf("File open error!!!\n");
return 0;
}
file.Read(&iRawDataCount, sizeof(DWORD));
file.Seek(sizeof(DWORD),CFile::begin);
for(i=0;i
|
|
|
|
|
Hey Guys
Having a picutre 'geographical map'
how can i know if the user has clicked inside the map or outside it
within or outside the boundry...
(the thing is that i dont want to allow the user to click outside the boudries
Regards
Regards
Ramy
|
|
|
|
|
look at the mousedown event. the e argument has 2 properties x,y you can check the numbers to make sure the mouse is within the picture by determining when the boundries stop--
ex: picture 400*300
if x > 10 andalso y > 10 andalso x < 400-10 andalso y < 300-10 then
' within
else
' boundry
end if
|
|
|
|
|
thx for answering
i havent tried thi yet
but i donu if it will work on a map- i mean the shape of the picture is not a sqaure or circle...
any way will try it
thx
Regards
Ramy
|
|
|
|
|
first thx for helping
i guess till now what u told me what s not succeeded
dont u think there is an method or function to determine boundaries ?
note the map(picture) is with black boundry and filled in white...
no other shapes or lines within the boundaries
thx
Regards
Ramy
|
|
|
|
|
charchabil03 wrote: dont u think there is an method or function to determine boundaries ?
The boundries of a image? No, there isn't. You have to supply those boundries yourself or code your own edge detection algorithm to figure them out.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave Kreskowiak wrote: You have to supply those boundries yourself
How is that??
Dave Kreskowiak wrote: or code your own edge detection algorithm to figure them out.
any hint for that?
Regards
Ramy
|
|
|
|
|
Just like image maps in HTML, you have to draw the boundries of each "region" of the map that's clickable and check for mouse clicks inside those regions.
Read this[^] for an explanation of what an "image map" is and the concept behind it. You'll have to implement your own functionality to implement this since there is nothing in Windows Forms that will do it for you.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|