|
Can you post me an example of your way!I'm not visual basic programer.I work in delphi,but any example is welcome,I'll try to convert it later.Thank you !
Servia Nostrum Regnum
|
|
|
|
|
in my site i have form to upload image
this image may be very big or very small
but
after user upload this image i want make some imagte prossessing as
(
1- i want to make two image from the original image
2- the first image have (50*50) cordinate
3- the secode image have (200*200) as max hight and max wiedth
4-i want for each image to take new name
)
u can see example in this site
http://www.blocket.se/vi/7874861.htm?ca=10_s
u can see tow image one small and one big
how can do as this in my site
Palestine
|
|
|
|
|
Hello ppl
Assume I have a ListView containing 5 columns. For a particular reason I'd like to be able to read the subitems of column 5 (index 4) into an ArrayList or a common array. I've tried different approaches, but the listview and I don't hit it off. Can somebody please give me code example of how this can be accomplished?
Tim
|
|
|
|
|
OK, I'll answer my own q. Here's one solution for those of you who have gotten into trouble with the mighty listview class...
For i As Integer = 0 To Me.MyListView.Items.Count - 1
Me.MyListView.Items(i).SubItems(5).Text
Next
'Where 5 is the index of the sixth column
|
|
|
|
|
When the thread has finished I suppose to get the message "MsgBox("Thread has finished.")" but nothing happens. Is there anybody who knows where I made the mistake ?
Private Sub but_StartBrowsing_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles but_StartBrowsing.Click
....
THR_Browse = New Threading.Thread(AddressOf BFMF.BrowseForFiles)
BFMF.dir = dirInfo
BFMF.exTensions = exTensions
BFMF.AL_MediaFileAndPath = AL_MediaFileAndPath
THR_Browse.Start()
End Sub
Private WithEvents evBFMF As clsFilesAndFolders
Sub BFMFeventHandler(ByVal AL_MediaFileAndPath As ArrayList) Handles evBFMF.ThreadComplete
MsgBox("Thread has finished.")
End Sub
Public Class clsFilesAndFolders
Public Event ThreadComplete(ByVal AL_MediaFileAndPath As ArrayList)
Public AL_MediaFileAndPath
Public exTensions
Public dir
Public Sub BrowseForFiles()
'This function search for files with a specific extension.
'dir : Directory path as directory.info.
'extensions() : Extension(s) where you are looking for.
'AL_MediaFileAndPath : Array list where the results are stored.
Dim subDir As IO.DirectoryInfo
Dim file As IO.FileInfo
Try
RaiseEvent ThreadComplete(AL_MediaFileAndPath)
For Each Filter As String In exTensions 'S1#. Loop through all extensions.
For Each file In dir.GetFiles("*." + Filter)
If file.Extension = "." + Filter Then AL_MediaFileAndPath.Add(file.FullName)
Console.WriteLine(file.FullName)
Try
Catch e As Exception
MsgBox("Problem to access File : " + file.FullName)
End Try
Next
Next Filter
For Each subDir In dir.GetDirectories
dir = subDir
BrowseForFiles()
Next
RaiseEvent ThreadComplete(AL_MediaFileAndPath)
Catch e As Exception
Main.cbo_NoAccesFileDirectory.Items.Add(dir.FullName) 'Add path to ComboBox.
Main.lbl_NoAccess.Visible = True 'Show Label.
Main.cbo_NoAccesFileDirectory.Visible = True 'Show ComboBox.
End Try
End Sub
end Class
|
|
|
|
|
i send variable by this fuction
dim ss as string = textbox1.text // here imagen i put "2415666:"
/// here code whcih minimaze the form of vb.net
System.Windows.Forms.SendKeys.SendWait("ss")// here the code which different and change . and after many click of button which make this action the string will print as "245566654" or some thing wrong .. the question why the variable printed like this ....
///here code whcih minimaze the form of vb.net
kilany
|
|
|
|
|
Mr kilany wrote: System.Windows.Forms.SendKeys.SendWait("ss")//
You didn't sned the contents of your ss variable. You sent the string "ss" to the other app (without the quotes).
The line should look like this:
SendKeys.SendWait(ss) ' no quotes!!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hi,
i want to show a combobox in datagrid at runtime.
sppose if user in 5 colum he press the f9 key then currentcell is show a combobox
pls give code it helpfull to me
thanks
vipin paliwal
|
|
|
|
|
|
Hi
I want to work with data in an excel worksheet in my vb6 program, but I don't know what to do...
Could anyone introduce me a tutorial?
Thanks
|
|
|
|
|
What do you mean by working with Excel from vb6? Do you just want to display only data on the form or display it in any control and you could edit its data? But first, try to check from google search result.[^]
|
|
|
|
|
Sorry for not being so clear...
I mean editing (readin/writing) data in excel sheets...
Thanks
|
|
|
|
|
|
Thanks... I found what I needed
|
|
|
|
|
can any one tell me how to connect combobox with datagrid in VB.NET
PLZ MAIL ME AT toneeraj.kumar@yahoo.com
neeraj kumar
|
|
|
|
|
<asp:datagrid id="dataGrid1" HorizontalAlign="Center" BorderColor="#CCCCCC" Runat="server" Width="792px" OnItemDataBound="dataGrid1_ItemDataBound" AllowSorting="True" AutoGenerateColumns="False" OnSortCommand="dataGrid1_SortCommand" Height="224px">
<Columns>
<asp:TemplateColumn>
<HeaderStyle Font-Bold="True" HorizontalAlign="Left"></HeaderStyle>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
<HeaderTemplate>
first column
</HeaderTemplate>
<ItemTemplate>
<asp:DropDownList ID="dd" Runat="server" OnSelectedIndexChanged="dataGrid1_SelectedIndexChanged" AutoPostBack="True"></asp:DropDownList>
</ItemTemplate>
</asp:TemplateColumn>
</column>
</asp:datagrid>
add the above code in html in between form opening closing tag
Shipra Pandey
Software Developer
Solversa Technology Pvt Ltd.
|
|
|
|
|
|
Hello everyone,
I'm currently a VB.NET guy and I need to create a 3D interactive globe and I have no idea if VB can do this of if there is another language that makes it easier. Can anyone point me in a good direction to create an interactive globe and find a way to distribute it as software.
No, I'm going going for a google earth thing either. I am creating it for a game, and it needs to be *like* Age of Myth or something similar in the fact that it needs to be zoomable and able to be spun around with the mouse, but that's about it. Well, actually it needs drag and drop capabilities.
Any suggestions are appreciated.
Mike
Gaming at the GuildofBlades.com is the only way to really experiece the level 99 Soul-Sucking Sword!
|
|
|
|
|
It is of course possible in VB.NET but extremely difficult!
The best solution would be to use Managed DirectX, there is an SDK for download on the MS site somewhere, (it's big, ~300MB I seem to remember) and this has samples in C# and VB.NET.
You'll need a powerful computer to run it though, I tried some of the samples and it ran quite slowly.
Another alternative is OpenGL but I don't know how this fares up, I havn't tried it.
Ed
|
|
|
|
|
I looked into downloading that DirectX thing and according to April's SDK, it's only in C++ and C#? Am I missing something?
Mike
Gaming at the GuildofBlades.com is the only way to really experiece the level 99 Soul-Sucking Sword!
|
|
|
|
|
Those are the languages which MS provide examples in I'm guessing but of course anything that C# can do VB.NET can do as well. It shouldn't be too difficult to understand what the C# code does since they will be using exactly the same classes.
An important fact to bear in mind is that the only major difference between C# and VB.NET is the syntax.
I know that this is a VB forum but I'd strongly recommend certainly understanding C# enough to translate it to VB.NET.
So in summary it will work with VB but probably none of the examples are provided in VB.
Something that might be helpful is #Develop which has a built in C# to VB, VB to C# (and some others like Boo) translators.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Hey guys, I've got a problem:
I'm using vb.net 2005 and to make sure that my program only runs one instance and retrieves the arguments specified when it has been run a second time, I used this[^] code. I converted it to vb.net 2005 and after disabling the application framework, it finally worked out. But now I've got 2 problems, when the application framework is turned off:
1. The icons in my program are ugly
2. My datagridview doesn't work properly anymore
I need to have the application framework turned off because the code I mentioned above needs a sub to start up which is only possible when the application framework has been turned off.
I can't find a solution... Anyone able to help?
|
|
|
|
|
Well guys, I found the solution to my problem and it's so easy!
First of all, turn on the application framework and check the single instance checkbox underneath in the settings. Then, add this little chuck of code to your project:
<br />
Namespace My<br />
Partial Friend Class MyApplication<br />
<br />
Private Sub MyApplication_Startup(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) Handles Me.Startup<br />
Try<br />
msgbox(e.CommandLine(0))<br />
Catch<br />
<br />
End Try<br />
End Sub<br />
<br />
Private Sub MyApplication_StartupNextInstance(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupNextInstanceEventArgs) Handles Me.StartupNextInstance<br />
e.BringToForeground = True<br />
Try<br />
msgbox(e.CommandLine(0))<br />
Catch<br />
<br />
End Try<br />
<br />
End Sub<br />
<br />
End Class<br />
End Namespace<br />
The sub MyApplication_Startup starts when the first instance get's run, you can insert your own chunk of code there. The other sub starts when a user tries to start a second instance of the same application. Easy, isn't it?
|
|
|
|
|
Hello All,
We are developing applications based on a off-the-shelf PCI card using the PCI 9030 controller. The PCI9030 comes with the SDK to communicate to it, which has device drivers that compile as a DLL (PLXAPI.DLL) in VC++.
However in .NET, they fail on the 'Handle' data type. The Handle datatype is declared as: typedef void *HANDLE in VC++.
However, in .NET, the closest I can find is IntPtr or Integer. Both fail. The function always considers the handle as NULL if it is an integer and causes a System.NullReference.Exception if it is an intptr. Since we have VC++ that creates the DLL, I was able to go thru the function (PLXPCIDeviceOpen) and internally the handle does not match any datatype. Where are things going wrong?
I have pasted below both the .NET function prototype and the actual code of the function from the VC++
.NET
Public Declare Function DeviceOpen Lib "PLXAPI.DLL" Alias "PlxPciDeviceOpen" (ByRef Device As PCIDevice, ByRef PCIDevHandle As IntPtr) As Integer
VC++
RETURN_CODE
PlxPciDeviceOpen(
DEVICE_LOCATION *pDevice, //Device location is bus/slot/vendorid etc
HANDLE *pHandle // verified - can find the device.
)
{
U8 VerMajor;
U8 VerMinor;
U8 VerRevision;
U32 i;
char DriverName[25];
IOCTLDATA IoBuffer;
RETURN_CODE rc;
if ((pDevice == NULL) || (pHandle == NULL))
//if ( (pDevice == NULL))
return ApiNullParam;
// Get the Serial number of the device, if not provided
if (pDevice->SerialNumber[0] == '\0')
{
i = 0;
// Search for the device matching the criteria
rc =
PlxPciDeviceFind(
pDevice,
&i
);
if (rc != ApiSuccess)
{
*pHandle = NULL;
return rc;
}
}
// If provided, the SerialNumber is sufficient to open a device
sprintf(
DriverName,
DRIVER_PATH "%s",
pDevice->SerialNumber
);
// Open the device
*pHandle =
CreateFile(
DriverName,
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
FILE_FLAG_DELETE_ON_CLOSE,
NULL
);
if (*pHandle == INVALID_HANDLE_VALUE)
{
*pHandle = NULL;
return ApiInvalidDeviceInfo;
}
// Add the handle to the device list.
if (DeviceListAdd(
*pHandle,
pDevice
) == NULL)
{
CloseHandle(
*pHandle
);
*pHandle = NULL;
return ApiInsufficientResources;
}
// Verify the driver version
PlxDriverVersion(
*pHandle,
&VerMajor,
&VerMinor,
&VerRevision
);
// Make sure the driver matches the DLL
if ((VerMajor != PLX_SDK_VERSION_MAJOR) ||
(VerMinor != PLX_SDK_VERSION_MINOR) ||
(VerRevision != PLX_SDK_VERSION_REVISION))
// Get device data from driver
IoMessage(
*pHandle,
PLX_IOCTL_DEVICE_INIT,
&IoBuffer
);
// Copy device information
*pDevice = IoBuffer.u.MgmtData.u.Device;
// msgbox put here indicates that function gets here.
return ApiSuccess;
}
|
|
|
|
|
Try passing the parameter ByVal instead of ByRef. For handles, the correct datatype should be IntPtr:
Public Declare Function DeviceOpen Lib "PLXAPI.DLL" _
Alias "PlxPciDeviceOpen" ( _
ByRef Device As PCIDevice, _
ByVal PCIDevHandle As IntPtr) As Integer
If not done correctly, you might also have a problem with the PCIDevice type, whatever that is.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|