|
Thanks, I think I've cracked it.
The solution (in case anyone needs it) which "works" is to use a PlaceHolder and a series of Hyperlinks, and to set the width of the Hyperlinks wide enough so that they naturally occupy a whole line.
Thanks for your help.
|
|
|
|
|
I need to provide my self a path for a file to save but also I try to create a new file type.
Like this;
NewFile.slx
--Config.xml
--Data.ktt
Above you see, NewFile.slx contains two files, but for making .ktt file I give a component a path and it saves the file on that path. So path should be like this "C:\NewFile.slx\Data.ktt"
I saw something like that on a software; file.dll?type=something it was giving you some jpeg file.
How could i do that?
|
|
|
|
|
You might want to do some research on "Alternate file streams" - But be warned: They only work on NTFS drives.
|
|
|
|
|
thank you for the answer but as you have said, it's just for ntfs.
i need something like folder but hidden. something to present with a path address
|
|
|
|
|
How about using zip without compression?
You can write your files to the zip file, and you can change the extension, so WinZip and other compression programs won't recognize it.
My advice is free, and you may get what you paid for.
|
|
|
|
|
But my custom files could be over 200 mb and if i go with the zip stuff, i have to create my data file to temp location then i gotta zip it. this means 400 mb hdd space instead of 200 mb. if i could give a path like this C:\file.zipx\data.ktt file will be directly saved under that.
|
|
|
|
|
Stylus VB wrote: i have to create my data file to temp location then i gotta zip it. this means 400 mb hdd space instead of 200 mb. if i could give a path like this C:\file.zipx\data.ktt file will be directly saved under that.
Let us assume for a moment that you managed to do what you are trying to do with a simple File.Move("C:\Data.ktt", "C:\YourContainerFile.cnt\Data.ktt") .
Here is what would actually happen:
1. C:\Data.ktt (disc usage 200 mb)
2. Copying Data.ktt to C:\YourContainerFile.cnt\ (disc usage 400 mb)
3. Deleting C:\Data.ktt (disc usage 200 mb again.)
You can create the zip file at run time, and write to it at run time. In the end you would use your system memory and hdd space to the exact same extent.
Think about it, what you are trying to accomplish in the end is a file containing another file. Or in other words, you want a folder that acts like a file. That is exactly what a zip file is.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi guys,
actually i am creating a form with comboboxex creating dynamically from the previous forms inputs. everything is working fine except one thing for comboboxes.
i wnat combobox to trigger selectedindexchanged event for all the comboboxes that are created dynamically. below is the code for combobox creation. please help me.
Public Class frmTableDetails
Dim txtboxTableName As New TextBox()
Dim chkPrimKey As New CheckBox()
Dim lblTableName As New Label
Dim lblNumCol As New Label
Friend WithEvents comboNumCol As New ComboBox
Dim numTable As Integer, i As Integer, vertPosVal As Integer, j As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
numTable = frmSchemaSetting.comboxNumTable.Text
Me.MdiParent = frmMain
vertPosVal = 25
For i = 1 To numTable
lblTableName = New Label
lblTableName.Name = "lblTableName" & i
Me.Controls.Add(lblTableName)
lblTableName.Text = "Table Name " & i
lblTableName.Location = New Point(20, vertPosVal)
txtboxTableName = New TextBox
txtboxTableName.Name = "txtboxTableName" & i
Me.Controls.Add(txtboxTableName)
txtboxTableName.Location = New Point(100, vertPosVal)
txtboxTableName.Height = 20
txtboxTableName.Width = 197
lblNumCol = New Label
lblNumCol.Name = "lblNumCol" & i
Me.Controls.Add(lblNumCol)
lblNumCol.Text = "Number of Columns "
lblNumCol.Location = New Point(305, vertPosVal)
comboNumCol = New ComboBox
comboNumCol.Name = "comboNumCol" & i
Me.Controls.Add(comboNumCol)
comboNumCol.Location = New Point(405, vertPosVal)
comboNumCol.DropDownStyle = ComboBoxStyle.DropDownList
For j = 1 To 30
comboNumCol.Items.Add(j)
Next
vertPosVal = vertPosVal + 25
Next
End Sub
Private Sub comboNumCol1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles comboNumCol.SelectedIndexChanged
frmColumnDetails.Show()
End Sub
End Class
|
|
|
|
|
What is needed is something like the following:
Private Sub comboNumCol1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles comboNumCol1.SelectedIndexChanged, comboNumCol2.SelectedIndexChanged, comboNumCol3.SelectedIndexChanged, ..........
frmColumnDetails.Show()
End Sub
adding a comboNumCol'N'.SelectedIndexChanged for each comboBox you want to be handled.
BTW Please, place your code samples between <pre>....code goes here....</pre> and format it properly. You know indenting, blanks before and after subs etc.
It will increase your chances of getting an answer at least 100 fold.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks henry for your prompt reply...and problem got solved..and the modified code is as followed...
Public Class frmTableDetails
Dim txtboxTableName As New TextBox()
Dim chkPrimKey As New CheckBox()
Dim lblTableName As New Label
Dim lblNumCol As New Label
Friend comboNumCol As New ComboBox
Dim numTable As Integer, i As Integer, vertPosVal As Integer, j As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
numTable = frmSchemaSetting.comboxNumTable.Text
Me.MdiParent = frmMain
vertPosVal = 25
For i = 1 To numTable
lblTableName = New Label
lblTableName.Name = "lblTableName" & i
Me.Controls.Add(lblTableName)
lblTableName.Text = "Table Name " & i
lblTableName.Location = New Point(20, vertPosVal)
txtboxTableName = New TextBox
txtboxTableName.Name = "txtboxTableName" & i
Me.Controls.Add(txtboxTableName)
txtboxTableName.Location = New Point(100, vertPosVal)
txtboxTableName.Height = 20
txtboxTableName.Width = 197
lblNumCol = New Label
lblNumCol.Name = "lblNumCol" & i
Me.Controls.Add(lblNumCol)
lblNumCol.Text = "Number of Columns "
lblNumCol.Location = New Point(305, vertPosVal)
comboNumCol = New ComboBox
comboNumCol.Name = "comboNumCol" & i
AddHandler comboNumCol.SelectedIndexChanged, AddressOf MyComboBox_SelectedIndexChanged
Me.Controls.Add(comboNumCol)
comboNumCol.Location = New Point(405, vertPosVal)
comboNumCol.DropDownStyle = ComboBoxStyle.DropDownList
For j = 1 To 30
comboNumCol.Items.Add(j)
Next
vertPosVal = vertPosVal + 25
Next
End Sub
Public Sub MyComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
MessageBox.Show(CType(sender, ComboBox).SelectedItem)
frmColumnDetails.Show()
End Sub
End Class
but now there comes another problem that when in the next form i am trying to read the value selected in combobox, it is giving error and i am stuck.. below is the code...continued from my last code...now "numcolumn = frmTableDetails.comboNumCol.Text" giving error at runtime that string to integr conversion not permitted.. but in my las code which u already read, same code is working fine i.e. "numTable = frmSchemaSetting.comboxNumTable.Text".. i don't know what is the issue, as the selected value from combobox will create further textboxes in my current form dynamically.. please help me..
Public Class frmColumnDetails
Dim txtboxTableName As New TextBox()
Dim chkPrimKey As New CheckBox()
Dim lblTableName As New Label
Dim vertPosVal As Integer, i As Integer, numcolumn As Integer
Private Sub frmColumnDetails_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
numcolumn = frmTableDetails.comboNumCol.Text
MsgBox(numcolumn)
For i = 1 To numcolumn
lblTableName = New Label
lblTableName.Name = "lblTableName" & i
Me.Controls.Add(lblTableName)
lblTableName.Text = "Table Name " & i
lblTableName.Location = New Point(20, vertPosVal)
txtboxTableName = New TextBox
txtboxTableName.Name = "txtboxTableName" & i
Me.Controls.Add(txtboxTableName)
txtboxTableName.Location = New Point(100, vertPosVal)
txtboxTableName.Height = 20
txtboxTableName.Width = 197
chkPrimKey = New CheckBox
chkPrimKey.Name = "chkPrimKey" & i
Me.Controls.Add(chkPrimKey)
chkPrimKey.Location = New Point(305, vertPosVal)
chkPrimKey.Text = "Primary Key"
vertPosVal = vertPosVal + 25
Next
End Sub
End Class
|
|
|
|
|
I have a small app which uses an Access DB as a datasource. I can query it for specific field values easily but I can't work out how to do a wildcard search in query builder.
The following works fine using a '?' for specific field matches but doesn't work for partial string searches:
SELECT [Stud/Owner New], [Sire], Dam, Damsire, [Sex & DOB], Notes
FROM [Data 2009]
WHERE (Dam LIKE ?)
ORDER BY [Stud/Owner New], [Sire]
Any ideas anyone?
Thanks.
|
|
|
|
|
Can you try this one?
WHERE (Dam LIKE 'dam*')
More information on wildcards can be found here[^]
I are troll
|
|
|
|
|
Hi,
Tried that one but no luck. The designer doesn't seem to like any character for searching other than the ?. If single quotes surround the filter criteria, it treats it as a specific text filter.
|
|
|
|
|
The QBE-editor from Access[^] accepts the filter without hesitation. I somewhat assumed from your original question that you wanted a text-filter?
I are troll
|
|
|
|
|
Hi, yes, as a former Access programmer I had assumed that I could just use the same characters in the filter field of the VS Query designer that I used to use when writing Access queries. As mentioned in my last post on the other thread it seems you just pass the characters as the parameter string rather than trying to make them actual filters.
Thanks for your suggestions.
|
|
|
|
|
What kind of wildcard search are you looking for? If you want it to search for something that begins with the letter A or a, try something like this:
WHERE UCASE(Dam) LIKE 'A%'
If you want anythign that contains an A or a, try this:
WHERE UCASE(Dam) LIKE '%A%'
Hope this helps.
|
|
|
|
|
Thanks for the clue, I've cracked it now. In the SQL query designer in VS2008 you leave the filter as a ? but pass the wild cards to it rather than trying to specify them as the actual filter. The query stays as WHERE Dam LIKE ? etc but in the VB code which calls the query you pass the "%" as the lead and / or tail of the parameter string i.e. "%partial Dam name%".
Thanks everyone for your help.
|
|
|
|
|
HEY EVERYBODY
I HAVE A PROJECT BUILT IN MFC AND NOW I WANT TO PRINT SOMETHING IN CONSOLE INSTEAD OF USED THE WINDOWS.
I HAVE TRIED FOLLOWING CODE BUT NOT WORKING ,,,,,GIVE ERROR........
BOOL CMANDTUApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
AllocConsole( );
// setup stdout
{
int fd = _open_osfhandle( (long)GetStdHandle( STD_OUTPUT_HANDLE ), 0);
FILE* fp = _fdopen( fd, "w" );
*stdout = *fp;
setvbuf( stdout, NULL, _IONBF, 0 );
}
// setup stdin
{
int fd = _open_osfhandle( (long)GetStdHandle( STD_INPUT_HANDLE ), 0);
FILE* fp = _fdopen( fd, "r" );
*stdin = *fp;
setvbuf( stdin, NULL, _IONBF, 0 );
}
// test stdin & stdout
//std::cout << "Console in place. Type a number: ";
/*
int x = 0;
std::cin >> x;
std::cout << "Value read: " << x << std::endl;
// generated code
*/
FreeConsole();
return FALSE;
}
WELCOME ANY TYPE OF ADVICES ,THANKS IN ADVANCE :
|
|
|
|
|
johnjitu wrote: WELCOME ANY TYPE OF ADVICES
TRY A C++ FORUM, THIS ONE IS ABOUT VB.NET!!
And please, don't use all-caps sentences. Shouting is inappropriate.
I are troll
|
|
|
|
|
|
Congratulations, you win moron of the day.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Christian Graus wrote: you win moron of the day.
for not using VB?
|
|
|
|
|
Luc Pattyn wrote: Christian Graus wrote:
you win moron of the day.
for not using VB? OMG
For not using his brain.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi.
To all Code Project members.
Vb.Net related question.
My question is that I have loaded an image in picturebox after that
i have completetly read to this image from pictureBox using getpixel
method. Now i have a big problem that As i am reading a pixel after reading I want to change color of that (point)pixel at pictureBox
coordinates not in image coordinates. So that I could see that i have
read to this pixel from image. and PictureBox is Showing with any
color that pixel has been readed.
Thanks to All.
|
|
|
|
|
You have two issues
1 - you're using a picture box when it's just a layer that gets in the way of what you want to do
2 - you need to convert between the pixel space and the size of the control, which is made harder because you're using a picturebox
Ditch the picture box, draw the image yourself and track the ratio between the image size and size on screen to calculate your mouse position.\
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|